package com.bgIntlgn.client.entity.manufacture;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 质检记录。
 * 
 * @author yuhui
 * 
 */
@Table(name = "quality_assurences", constrain = "")
public class QualityAssurence implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('quality_assurences_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	/**
	 * 对应的工艺生产记录
	 */
	@Field(name = "work_record_id", type = "int8 ", constrain = " not null references work_recods(id)  on update cascade ")
	private Long workRecodId;

	/**
	 * 报损的数量
	 */
	@Field(name = "broken", type = "int", constrain = "default 0")
	private Integer broken;

	/**
	 * 质检人员
	 */
	@Field(name = "checker", type = "int8", constrain = "references employees(id)  on update cascade ")
	private Long checker;

	/**
	 * 质检时间
	 */
	@Field(name = "time", type = "timestamp", constrain = "")
	private Date time;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getWorkRecodId() {
		return this.workRecodId;
	}

	public void setWorkRecodId(Long workRecodId) {
		this.workRecodId = workRecodId;
	}

	public Integer getBroken() {
		return this.broken;
	}

	public void setBroken(Integer broken) {
		this.broken = broken;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Long getChecker() {
		return this.checker;
	}

	public void setChecker(Long checker) {
		this.checker = checker;
	}
}
